package com.mvetc.dao;



import java.util.Map;

import com.mvetc.entity.PageInfo;
import com.mvetc.entity.User;


public interface UserDao {

	 /**
	 * @param user
	 * @return
	 * 添加记录
	 */
	int insert(User user);
	
	 /**
	 * @param username
	 * @param password
	 * @return
	 * 查询
	 */
	User findByUserNameAndPassword(String userName,String userPassword);

	User findByUserName(String userName);
	
	/**
	 * @author	linshiqing
	 * @param params
	 * @return
	 */
	PageInfo<User> findBy(Map<String, String> params);
	
	/**
	 * @author	linshiqing
	 * @param userId
	 * @return
	 */
	int deleteById(String userId);
	
	/**
	 * @author	linshiqing
	 * @param user
	 * @return
	 */
	int updateUser(User user);
}
